// 前端自定义路由信息
// 定义路由类型
export interface RouteRecord {
    path: string;
    name: string;
    component: string;
    children?: RouteRecord[];
}
export const fetchRoutes = (): Promise<RouteRecord[]> => {
    return new Promise((resolve) => {
        // 模拟API请求延迟
        setTimeout(() => {
            resolve([
                {
                    path: "/index",
                    name: "Index",
                    component: "index",
                },
                {
                    path: "/system",
                    name: "System",
                    component: "system",
                    children: [
                        {
                            path: "menu",
                            name: "Menu",
                            component: "menu",
                        },
                    ],
                },
                {
                    path: "/user",
                    name: "User",
                    component: "user"
                },
                {
                    path: "/plan",
                    name: "Plan",
                    component: "plan"
                },
            ]);
        }, 0);
    });
};